package com.cuizhang.demo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class ImageActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.image);
		
		Intent intent = getIntent();
		int imageId = intent.getIntExtra("imageId", 0);
		
		ImageView iv = (ImageView) findViewById(R.id.src);
		iv.setImageDrawable(getResources().getDrawable(imageId));
		iv.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				finish();
			}
		});
	}


}
